#include "EndScreen.h"
#include "StartScreen.h"
#include <MultiWidgets\TextWidget.hpp>

void EndScreen::nextScreen(){
	Radiant::BinaryData data;
	//data.write(temp);
	eventSend("nextScreen",data);
}

void EndScreen::init(){

	auto b1 = MultiWidgets::create<MultiWidgets::TextWidget>("start");
	b1->setInputFlags(INPUT_SINGLE_TAPS);
    b1->eventAddListener("single-tap", "nextStart", this);
	addChild(b1);


}

 void EndScreen::eventProcess(const QByteArray & messageId, Radiant::BinaryData & data)
  {
    if(messageId == "nextStart") nextScreen();

  }